//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
// 定义接口

//新增
export async function addFun(params) {
    return request({
        url: `${config.aheadPlan}coreCompet/corecompet/add`,
        method: 'POST',
        data: params,
    });
};
//编辑
export async function editFun(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/edit`,
      method: 'PUT',
      data: params,
      headers: {
        'Content-type': 'application/json',
      }
  });
};

//查询
export async function queryInfo(params) {
    return request({
        url: `${config.aheadPlan}coreCompet/corecompet/queryById`,
        method: 'GET',
        data: params,
    });
  };

//查询竞品信息
export async function queryByCompet(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/queryByCompet`,
      method: 'GET',
      data: params,
  });
};

//获取核心竞品
export async function getProjectByCompet(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/getProjectByCompet`,
      method: 'GET',
      data: params,
  });
};
//获取核心竞品
export async function queryByRg(params) {
  return request({
      url: `${config.aheadPlan}coreCompet/corecompet/queryByRg`,
      method: 'GET',
      data: params,
  });
};

